define(["backbone"],function(){
  console.log("进入router.js成功");
  var Router = Backbone.Router.extend({
    routes:{
      // "":"home",
      "home":"home",
      "market":"market",
      "shopCart":"shopCart",
      "mine":"mine",
      "*actions":"defaultActions"
    },
    home:function(){
      require(["jquery","text!./home/home.html","./home/js/home.js","css!./home/css/home.css"],function($,html,home){
        $("#content").html(html);
      })
    },
    market:function(){
      require(["jquery","text!./market/market.html","css!./market/css/market.css"],function($,html){
        $("#content").html(html);
      })
    },
    shopCart:function(){
      require(["jquery","text!./shopCart/shopCart.html","css!./shopCart/css/shopCart.css"],function($,html){
        $("#content").html(html);
      })
    },
    mine:function(){
      require(["jquery","text!./mine/mine.html","css!./mine/css/mine.css"],function($,html){
        $("#content").html(html);
      })
    },
    defaultActions:function(){
      location.hash = "home";
    }
  });
  var router = new Router();
  return router;
});
